<?php
include "config.php";//apikey配置文件
include "jd/JdClient.php";//请求文件
include "jd/RequestCheckUtil.php";//请求文件
include "jd/request/UnionOpenCategoryGoodsGetRequest.php";//接口参数

$c = new JdClient();
$c->appKey = $ApiConfig["AppKey"];
$c->appSecret = $ApiConfig["AppSecret"];

$res = new UnionOpenCategoryGoodsGetRequest();
$req= array();
$req["parentId"]=1;//父类目id(一级父类目为0)
$req["grade"]=1;//类目级别(类目级别 0，1，2 代表一、二、三级类目)
$res -> setReq($req);
$resp = $c->execute($res);
print_r($resp);